import { getSysTopInfo } from '@/utils/http.js'
export default {

	namespaced: true,
	state: {
		topPackage: [],
	},
	getters: {

	},
	mutations: {
		setTopPackage(state, top) {
			 top.map(arr=>{
				 arr.name=arr.name+` (${arr.money}元)`
			 })
			state.topPackage = top
		}
	},
	actions: {
		getTopPackage({ commit }) {
			getSysTopInfo().then(res => {
				const { data } = res
				commit('setTopPackage', data)
			})
		},
	}
}